﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinFormClient
{
    public class ClientEventArgs : EventArgs
    {
        public enum EventType
        {
            TOPIC,
            GROUP,
            MESSAGE,
         }
        public EventType type;
        public WinFormClient.ClientEventArgs.EventType Type
        {
            get { return type; }
            set { type = value; }
        }
        public string content;
        public string Content
        {
            get { return content; }
            set { content = value; }
        }
        public Message msg;
        public WinFormClient.Message Message
        {
            get { return msg; }
            set { msg = value; }
        }
    }

    public class Client
    {
        public int debug;
        User me;
        DataProvider dataprovider;
        //NetworkAgant net;
        public event EventHandler<ClientEventArgs> ShowMsg;
        public event EventHandler FinishedLoadContent;

        public Client()
        {
            me = LocalStorage.GetUserInfo().ToUser();
        }

        public void Login()
        {
            throw new NotImplementedException();
        }

        public void StartLoadContent()
        {
            FinishedLoadContent(null,null);
        }

        public void Exit()
        {
            LocalStorage.SaveAll();
        }

    }
}
